Skip to main content

Block

Get block reward by block number.

Returns the block reward by block number.

?module=block
&action=getblockreward
&blockno={blockNumber}

Parameters

NameDescription
Module*A string with the name of the module to be invoked.
Must be set to: blocks
Action*A string with the name of the action to be invoked.
Must be set to: getblockreward
blockno*A nonnegative integer that represents the block number.

Responses

Code 200 (successful)

{
"message": "OK",
"result": {
"blockMiner": "0x13a06d3dfe21e0db5c016c03ea7d2509f7f8d1e3",
"blockNumber": "2165403",
"blockReward": "5314181600000000000",
"timeStamp": "1472533979",
"uncleInclusionReward": null,
"uncles": null
},
"status": "1"
}

Code 200 (error)

{
"message": "Invalid block number",
"result": null,
"status": "0"
}

Get Block Number by Timestamp.

Returns the block number that was mined at a certain timestamp.

?module=block
&action=getblocknobytime×tamp={blockTimestamp}
&closest={before/after}

Parameters

NameDescription
Module*A string with the name of the module to be invoked.
Must be set to: blocks
Action*A string with the name of the action to be invoked.
Must be set to: getblocknobytime
timestamp*A nonnegative integer that represents the block timestamp (Unix timestamp in seconds).
closestDirection to find the closest block number to given timestamp. Available values: before/after.

Responses

Code 200 (successful)

{
"message": "OK",
"result": {
"blockNumber": "2165403"
},
"status": "1"
}

Code 200 (error)

{
"message": "Invalid params",
"result": null,
"status": "0"
}

Mimics wyzth JSON RPC's wyz_blockNumber.

Returns the latest block number.

?module=block
&action=wyz_block_number

Parameters

NameDescription
Module*A string with the name of the module to be invoked.
Must be set to: blocks
Action*A string with the name of the action to be invoked.
Must be set to: wyz_block_number
idA nonnegative integer that represents the json rpc request id.

Responses

Code 200 (successful)

{
"id": 1,
"jsonrpc": "2.0",
"result": "0xb33bf1"
}